//package com.zyh.market.controller;
//
//import com.zyh.market.model.R;
//import com.zyh.market.service.FileService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestPart;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.multipart.MultipartFile;
//
//import javax.annotation.Resource;
//
///**
// * @author 西尾coding
// * 文件上传接口
// */
//@Api(tags = "FileController")
//@RestController
//@RequestMapping("/upload")
//public class FileController {
//
//    @Resource
//    private FileService ossService;
//
//    /**
//     * 上传头像
//     *
//     * @param file
//     * @return
//     */
//    @ApiOperation(value = "文件上传")
//    @PostMapping("/image")
//    public R<String> uploadOssFile(@RequestPart("file") MultipartFile file) {
//        //返回上传到oss的路径
//        String url = ossService.uploadFileAvatar(file);
//        System.out.println("url:::" + url);
//        //返回r对象
//        return R.ok(url);
//    }
//}